package fraction;

class Fraction {
    private double f1;
    private double f2;
    public double getF1(){
        return f1;
    }
    public void setF1(double f1){
        this.f1 = f1;
    }
    public double getF2(){
        return f2;
    }
    public void setF2(double f2){
        this.f2 = f2;
    }
    Fraction (){
        this.f1 = 1.0;
        this.f2 = 1.0;
    }
    Fraction (double f1,double f2){
        this.f1 = f1;
        this.f2 = f2;
    }
    void printF1 (double f1,double f2){
        double a = f1/f2;
        System.out.println(a);

    }
    void printF2 (){
        System.out.println(f1 + "/" + f2);
    }
    public double add(){
       return (f1+f2);
    }
    public double subbtact(){
        return f1-f2;
    }
    public double mulyiply(){
        return f1*f2;
    }
    public double divide(){
        return f1/f2;
    }

}
class FractionSub extends Fraction{
    FractionSub(){
        double f1 = 2;
        double f2 = 3;
        setF1(f1);
        setF2(f2);
        System.out.println(f1 + "/" + f2);

    }
}
class FractionTest {
    public static void main(String[] args) {
        FractionSub f = new FractionSub();
        Fraction fa = new Fraction();

        System.out.println(f.add());
        System.out.println(f.mulyiply());
        System.out.println(f.subbtact());
        System.out.println(f.divide());



    }

}